#! /usr/bin/env python
# _*_ coding: utf-8 _*_

''' My first wxPython application '''

import wx

class Frame(wx.Frame):
    def __init__(self, parent=None, id=-1, title='My wxPython app', style=wx.DEFAULT_FRAME_STYLE):
        wx.Frame.__init__(self, parent, id, title, style=style)
        image = wx.Image('tool.jpg', wx.BITMAP_TYPE_JPEG).ConvertToBitmap()
        self.CreateStatusBar()
        toolbar = self.CreateToolBar()
        toolbar.AddSimpleTool(wx.NewId(), image, "toolbar", "long help")
        toolbar.Realize()
        menubar = wx.MenuBar()
        menua = wx.Menu()
        menua.Append(wx.NewId(), "&Open", "Open help")
        menubar.Append(menua, "&File")
        menub = wx.Menu()
        menub.Append(wx.NewId(), "&Copy", "Copy help")
        menub.AppendSeparator()
        menub.Append(wx.NewId(), "&Paster", "Paster help")
        menubar.Append(menub, "&Edit")
        self.SetMenuBar(menubar)

class App(wx.App):
    
    def OnInit(self):
        frame = Frame(parent=None, id=-1, title='My wxPython app',
                style=wx.DEFAULT_FRAME_STYLE|wx.SYSTEM_MENU)
        frame.Show()
        return True

if __name__ == '__main__':
    app = App()
    app.MainLoop()
